using UnityEngine;
using System.Collections;

public class Level1 : MonoBehaviour {
    private float centerScreenX;
    private float centerScreenY;
    private float timeToGo;

    public GameObject elevator;
    private float moveElevator;
    private float temporizador;
    private float contador;
    private Touch touch;

	// Use this for initialization
	void Start () {
        MainScript.LoadGame();
        centerScreenX = MainScript.centerScreenX;
        centerScreenY = MainScript.centerScreenY;
        moveElevator = 0;
        temporizador = 0.02f;
        contador = 0.0f;
	}
	
	
	// Update is called once per frame
	void Update () {
        if (Input.GetKeyDown(KeyCode.Escape))
        {
            Application.LoadLevel("menu");
        }
        /*touch = Input.GetTouch(0);
        
        if (touch.deltaPosition.x > 0){
            
        }
        if (Input.touchCount > 0){

        }
        //Mario's tricky
        contador = contador + Time.deltaTime;
        if (contador >= temporizador){

            contador = 0.0f;
        }*/
	}
	void OnGUI(){
		/*
		Rect menuButton = new Rect(meioDeTelax-50 ,meioDeTelay + 140,100, 30);
		//criar botao
        if (GUI.Button(menuButton, "Back Menu"))
		{
			Application.LoadLevel("menu");
		}

        //elevator testing movement
        if (Input.GetKeyDown(KeyCode.A) && elevator.transform.position.x > -3)
        {
            elevator.transform.position = new Vector3(elevator.transform.position.x - 1.5f,
                                                      elevator.transform.position.y,
                                                      elevator.transform.position.z);
        }
        if (Input.GetKeyDown(KeyCode.D) && elevator.transform.position.x < 3)
        {
            elevator.transform.position = new Vector3(elevator.transform.position.x + 1.5f,
                                                      elevator.transform.position.y,
                                                      elevator.transform.position.z);
        }*/
	}
}
